<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .fa {
            width: 200px;
            height: 200px;
            background: red;
            position: relative;
        }

        .chi {
            width: 100px;
            height: 100px;
            background: black;
            position: absolute;
            top: 50%;
            left: 50%;
            /* margin: 0 auto; */
            margin-top: -50px;
            margin-left: -50px;
            /* transform: translateX(-50%) translateY(-50%); */
        }
    </style>
</head>

<body>
    <div class="fa">
        <div class="chi"></div>
    </div>
</body>

</html>